import {createRouter, createWebHashHistory} from 'vue-router'
import AdminLogin from '@/components/AdminLogin'
import AdminHome from '@/components/AdminHome'
import SettingList from "@/components/setting/SettingList";
import HomeIndex from "@/components/home/HomeIndex";
import CategoryList from "@/components/category/CategoryList";
import ArticleList from "@/components/article/ArticleList";
import CommentList from "@/components/comment/CommentList";
import UserList from "@/components/user/UserList";
import LinkList from "@/components/link/LinkList";
import VersionList from "@/components/version/VersionList";
import DevList from "@/components/dev/DevList";

export const constantRoutes = [{path: '/login', component: AdminLogin,}, {
    path: '', component: AdminHome, redirect: "/index", icon: 'home-outlined', children: [{
        path: '/index', component: HomeIndex, meta: {title: "首页"}, icon: 'setting-outlined'
    }, {
        path: '/setting', component: SettingList, meta: {title: "设置"}, icon: 'setting-outlined'
    }, {
        path: '/category', component: CategoryList, meta: {title: "栏目"}, icon: 'profile-outlined'
    }, {
        path: '/article', component: ArticleList, meta: {title: "文章"}, icon: 'read-outlined'
    }, {
        path: '/comment', component: CommentList, meta: {title: "评论"}, icon: 'comment-outlined'
    }, {
        path: '/user', component: UserList, meta: {title: "用户"}, icon: 'team-outlined'
    }, {
        path: '/link', component: LinkList, meta: {title: "链接"}, icon: 'link-outlined'
    }, {
        path: '/version', component: VersionList, meta: {title: "版本"}, icon: 'cloud-server-outlined'
    }, {
        path: '/dev', component: DevList, meta: {title: "实验室"}, icon: 'experiment-outlined'
        
    }]
}]

const router = createRouter({
    history: createWebHashHistory(), routes: constantRoutes
});

export default router
